package cn.sofwin.dubbo.dao;

import cn.sowfin.dubbo.entity.User;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Options;
import org.apache.ibatis.annotations.Select;

@Mapper
public interface UserDao {
    @Options(useGeneratedKeys = true,keyProperty = "id")
    @Insert("insert into user(username,password,nickname)values(#{username},#{password},#{nickname})")
    void insert(User user);
    @Select("select * from user where username=#{username} and password=#{password}")
    User select(User user);


}
